package com.jhhc.RHDB.Data.Pojo;


import java.text.ParseException;
import java.text.SimpleDateFormat;

public class ST_RSVR_R {
    private String stcd;

    private String tm;

    private Double rz;

    private Double inq;

    private Double w;

    private Double blrz;

    private Double otq;

    private String rwchrcd;

    private String rwptn;

    private Double inqdr;

    private String msqmt;

    public String getStcd() {
        return stcd;
    }

    public void setStcd(String stcd) {
        this.stcd = stcd == null ? null : stcd.trim();
    }

    public String getTm() {
        return tm;
    }

    public void setTm(String tm) {
        this.tm = tm;
    }

    public Double getRz() {
        return rz;
    }

    public void setRz(Double rz) {
        this.rz = rz;
    }

    public Double getInq() {
        return inq;
    }

    public void setInq(Double inq) {
        this.inq = inq;
    }

    public Double getW() {
        return w;
    }

    public void setW(Double w) {
        this.w = w;
    }

    public Double getBlrz() {
        return blrz;
    }

    public void setBlrz(Double blrz) {
        this.blrz = blrz;
    }

    public Double getOtq() {
        return otq;
    }

    public void setOtq(Double otq) {
        this.otq = otq;
    }

    public String getRwchrcd() {
        return rwchrcd;
    }

    public void setRwchrcd(String rwchrcd) {
        this.rwchrcd = rwchrcd == null ? null : rwchrcd.trim();
    }

    public String getRwptn() {
        return rwptn;
    }

    public void setRwptn(String rwptn) {
        this.rwptn = rwptn == null ? null : rwptn.trim();
    }

    public Double getInqdr() {
        return inqdr;
    }

    public void setInqdr(Double inqdr) {
        this.inqdr = inqdr;
    }

    public String getMsqmt() {
        return msqmt;
    }

    public void setMsqmt(String msqmt) {
        this.msqmt = msqmt == null ? null : msqmt.trim();
    }

    public String getData1() {

        return setData1();
    }
    public String getData() {

        // System.out.println( setData());

        return  setData();
    }

    public String setData() {
        String data = getTm();
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); // 日期格式转换 天
        try {
            String day  =format.format(format.parse(data));
            return day;
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return null;
    }
    public String getMonth() {

        return setMonth();
    }

    public String setMonth() {
        String month1 = getTm();
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); // 日期格式转换 月份
        try {
            String day  = format.format(format.parse(month1)).substring(0,7);
            //  System.out.println(day);
            return day;
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return null;
    }
    public String setData1() {
        String data1 = getTm();
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); // 日期格式转换 小时
        try {
            String day  = format.format(format.parse(data1)).substring(11,16);
            return day;
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return null;
    }

    public String getMonth1() {

        return setMonth1();
    }

    public String setMonth1() {
        String month1 = getTm();
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); // 日期格式转换 月份
        try {
            String day  = format.format(format.parse(month1)).substring(8,16);
            String day1  = format.format(format.parse(month1)).substring(11,16);
            String day2  = format.format(format.parse(month1)).substring(14,16);
            if (day1.equals("08:00")&&day2.equals("00")){
                return day;
            }
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return "";
    }

    @Override
    public String toString() {
        return "ST_RSVR_R{" +
                "stcd='" + stcd + '\'' +
                ", tm='" + tm + '\'' +
                ", rz=" + rz +
                ", inq=" + inq +
                ", w=" + w +
                ", blrz=" + blrz +
                ", otq=" + otq +
                ", rwchrcd='" + rwchrcd + '\'' +
                ", rwptn='" + rwptn + '\'' +
                ", inqdr=" + inqdr +
                ", msqmt='" + msqmt + '\'' +
                '}';
    }
}